把网站文件复制到
/var/www/html/ 中
[root@localhost ~]# nautilus /var/www/html/
[root@localhost ~ ]# chown -R apache.apache /var/www/html/ *
[root@localhost ~ ]# chmod -R 700 /var/www/html/ *
[root@localhost ~ ]# restorecon -R /var/www/html/ *
[root@localhost ~ ]# gedit /etc/httpd/conf/httpd.conf &
[root@localhost ~ ]# service httpd start 或者 service httpd restart
[root@localhost ~ ]# iptables -F //清空防火墙规则,让其他机器可以访问WWW服务器
[root@localhost ~ ]# ifconfig //查看自己的IP地址
[root@localhost ~]# service mysqld start //启动mysql服务器
[root@localhost ~]# mysqladmin -u root password "642531" //为mysql用户root设置登录密码
[root@localhost ~]# mysql -u root -p //以root用户身份登录mysql服务器
Enter password: //输入密码"642531"
mysql> create database news; //创建数据库news
mysql> use news; //使用数据库news
//创建表user_msg,里面存储论坛成员的用户名和密码,用于登录论坛
mysql> create table user_msg(name VARCHAR(40),password VARCHAR(40));
mysql> insert into user_msg(name,password) values('ztg', '642531'); //添加论坛成员ztg
//创建表bbs_subject,里面存储论坛的所有主题
mysql> create table bbs_subject(id int(9) NOT NULL auto_increment,subject varchar(100) NOT NULL,send_time datetime,auth varchar(20) NOT NULL,reply int(9) DEFAULT '0' NOT NULL,hits int(9) DEFAULT '0' NOT NULL,last_time datetime,PRIMARY KEY (id));
//创建表bbs_content,里面存储论坛的所有帖子信息
mysql> create table bbs_content(id int(9) NOT NULL auto_increment,subject_no int(9) DEFAULT '0' NOT NULL,name varchar(20) NOT NULL,postdate datetime,msg text,PRIMARY KEY (id));
mysql> exit
[root@localhost ~]# gedit /etc/php.ini
将 /etc/php.ini 文件中的
register_globals = Off
改为
register_globals = On
将 /etc/php.ini 文件中的
short_open_tag = Off
改为
short_open_tag = On
[root@localhost ~]# service httpd restart
阅读(69) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
[root@localhost ~]# nautilus /var/www/html/
[root@localhost ~ ]# chown -R apache.apache /var/www/html/ *
[root@localhost ~ ]# chmod -R 700 /var/www/html/ *
[root@localhost ~ ]# restorecon -R /var/www/html/ *
[root@localhost ~ ]# gedit /etc/httpd/conf/httpd.conf &
[root@localhost ~ ]# service httpd start 或者 service httpd restart
[root@localhost ~ ]# iptables -F //清空防火墙规则,让其他机器可以访问WWW服务器
[root@localhost ~ ]# ifconfig //查看自己的IP地址
[root@localhost ~]# service mysqld start //启动mysql服务器
[root@localhost ~]# mysqladmin -u root password "642531" //为mysql用户root设置登录密码
[root@localhost ~]# mysql -u root -p //以root用户身份登录mysql服务器
Enter password: //输入密码"642531"
mysql> create database news; //创建数据库news
mysql> use news; //使用数据库news
//创建表user_msg,里面存储论坛成员的用户名和密码,用于登录论坛
mysql> create table user_msg(name VARCHAR(40),password VARCHAR(40));
mysql> insert into user_msg(name,password) values('ztg', '642531'); //添加论坛成员ztg
//创建表bbs_subject,里面存储论坛的所有主题
mysql> create table bbs_subject(id int(9) NOT NULL auto_increment,subject varchar(100) NOT NULL,send_time datetime,auth varchar(20) NOT NULL,reply int(9) DEFAULT '0' NOT NULL,hits int(9) DEFAULT '0' NOT NULL,last_time datetime,PRIMARY KEY (id));
//创建表bbs_content,里面存储论坛的所有帖子信息
mysql> create table bbs_content(id int(9) NOT NULL auto_increment,subject_no int(9) DEFAULT '0' NOT NULL,name varchar(20) NOT NULL,postdate datetime,msg text,PRIMARY KEY (id));
mysql> exit
[root@localhost ~]# gedit /etc/php.ini
将 /etc/php.ini 文件中的
register_globals = Off
改为
register_globals = On
将 /etc/php.ini 文件中的
short_open_tag = Off
改为
short_open_tag = On
[root@localhost ~]# service httpd restart
相关热门文章
给主人留下些什么吧!~~
评论热议