|
|
我是linux初学者,如果操作有误,请高手指正,谢谢
rpm -qa | grep httpd //检查httpd软件包
httpd-manual
httpd
redhat-config-httpd
rpm -qa | grep php //检查php软件包
php
php-ldap
php-imap
rpm -qa | grep mysql //检查mysql软件包
mysql-devel
mysql
mysql-server
chkconfig --list httpd //检查运行级别
chkconfig --level 3 httpd on //设置运行级别
chkconfig --list mysqld
chkconfig --level 3 mysqld on
service httpd start //启动
service httpd stop //关闭
service httpd status //查看状态
service mysqld start
service mysqld stop
service mysqld status
/usr/bin/mysql -u root password K998C602 //设置mysql管理密码
/usr/bin/mysql -u root -p
mysql > create database discuz; //创建discuz数据库
mysql > drop database discuz; //删除discuz数据库
mysql > show databases; //查看数据库
mysql > use discuz; //使用discuz数据库
mysql > show status; //查看状态
/usr/bin/mysqldump -u root -p discuz > /bak/discuz.sql //备份discuz数据库
/usr/bin/mysql -u root -p disucz < /var/www/html/sql/discuz.sql //恢复discuz数据库
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak //备份httpd.conf文件
vi /etc/httpd/conf/httpd.conf //编辑httpd.conf
serveradmin webmaster@mail.test.com //设置管理员联系邮件
servername www.test.com //设置域名
documentroot "/var/www/html" //设置网页目录
<directory "/var/www/html">
adddefaultcharset gb2312 //设置默认语言
directoryindex index.htm index.php //设置首页
chmod -R 777 /var/www/html //设置权限为777
下载discuz 2.5 sp1,解压上传到/var/www/html目录,浏览器打开http://localhost/install.php,安装 |
|