How to build a website in centos?
1, check whether the database is installed
rpm -qa | grep mysqld
2, start the database and set the account password for the database
service mysqld start //启动数据库 mysqladmin -u 账号 password 密码 //设置数据库账号密码
3, enter the database and create a database
mysql -u 账号 -p //进入数据库,输入这个后会让你输入密码,密码不会显示出来但确实输入 create database wordpress; //创建名字为wordpress的数据库 quit; 退出数据库
mount /dev/cdrom /mnt rpm -ivh /mnt/Packages/unzip-6.0-1.el6.i686.rpm
##6, Enter the website directory and decompress
cd /www/luntan unzip wordpress-4.9.4-zh_CN.zip ll /www/luntan //查看是否解压成功
7, modify the Apache configuration file, and add port 81, G Jump to the last line and find this to modify the port number and website path
vim /etc/httpd/conf/httpd.conf shift+?//后面跟查找关键字符 shift+g //到最底部 gg+行数 //到指定行数
8, restart the mysql and httpd services and close both Firewall
service mysqld restart //mysqld服务 service httpd restart //Apache服务 service iptables stop //iptables防火墙 setenforce 0 //selinux防火墙
9. Open the browser and enter IP:port number in the URL bar, and follow the steps in the picture to succeed (enter the IP to start the installation, the user name is the database user name, and the password is also the database password)
Related references:
The above is the detailed content of How to build a website on centos. For more information, please follow other related articles on the PHP Chinese website!