基础环境
安装epel源
[root@aliyun ~]# yum -y install epel-release 停用防火墙 [root@aliyun ~]# systemctl stop firewalld[root@aliyun ~]# systemctl disable firewalld 关闭selinux暂时关闭:
setenforce 0永久关闭:vim /etc/sysconfig/selinuxselinux=disabled
LAMP环境
1.安装相关的包
[root@aliyun ~]# yum -y install httpd[root@aliyun ~]# yum -y install php php-cli php-curl php-fpm php-intl php-mcrypt php-mysql php-gd php-mbstringphp-xml php-dom[root@aliyun ~]# yum -y install mariadb-server mariadb[root@aliyun ~]# yum -y install mod_xsendfile
2.配置apache
[root@aliyun ~]# systemctl start httpd[root@aliyun ~]# systemctl enable httpdCreated symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.10/15浏览器测试欢迎页面192.168.119.126[root@aliyun ~]# rm -rf /etc/httpd/conf.d/welcome.conf[root@aliyun ~]# vim /var/www/html/index.htmlwelcome to edusoho!
3.配置mysql
[root@aliyun ~]# systemctl start mariadb[root@aliyun ~]# systemctl enable mariadbCreated symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.[root@aliyun ~]# mysql_secure_installationYYYYY[root@aliyun ~]# mysql -uroot -pMariaDB [(none)]> create database edusoho;Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> show databases;+--------------------+| Database |+--------------------+| information_schema || edusoho || mysql || performance_schema |+--------------------+4 rows in set (0.00 sec)
4.配置php
[root@aliyun ~]# vim /etc/php.ini
/string查找并修改post_max_size = 1024Mmemory_limit = 1024Mupload_max_filesize = 1024Mdate.timezone = Asia/ShangHai[root@aliyun ~]# vim /etc/php-fpm.d/www.conflisten.owner = apachelisten.group = apachelisten.mode = 0666[root@aliyun web]# systemctl start php-fpm[root@aliyun web]# systemctl enable php-fpm11/15[root@aliyun ~]# cd /var/www/html/[root@aliyun html]# lsindex.html[root@aliyun html]# vim index.php<?phpphpinfo()?>浏览器中输入本机的ip地址/index.php,出现info页面表明php安装成功否则,重启httpd服务,php-fpm服务LAMP环境OK....edusoho部署
1.download
[root@aliyun ~]# wget http://download.edusoho.com/edusoho-7.5.12.tar.gz[root@aliyun Desktop]# tar xf edusoho-7.5.12.tar.gz[root@localhost Desktop]# mv edusoho /var/www/html/[root@aliyun ~]# chown -R apache.apache /var/www/html/edusoho/
2.部署
[root@aliyun ~]# vim /etc/httpd/conf.d/edusoho.conf
ServerName www.xiaochen.orgDocumentRoot /var/www/html/edusoho/web AllowOverride AllRequire all granted
检查配置文件是否有语法错误
[root@localhost ~]# httpd -tAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the'ServerName' directive globally to suppress this messageSyntax OK[root@aliyun ~]# systemctl restart httpd
3.访问测试并安装网站
AccessKey: B8V2t1Lu8d983R7Wz3oSMfigGvYY3hTESecretKey: pOHSPsnXGx6KoeGYh5Q4l9k1Ej0IATn0