LAMP环境搭建(基于Fedora系统)

一、环境说明

  • 操作系统

Fedora-Server-x86-64-29

  • LAMP集成安装包

bitnami-lampstack-7.1.25-0-linux-x64-installer.run

二、LAMP安装配置

1.将bitnami-lampstack-7.1.25-0-linux-x64-installer.run上传至系统
2.给与安装程序执行权限,chmod u+x bitnami-lampstack-7.1.25-0-linux-x64-installer.run
3.安装mysql必要的perl,sudo yum install perl perl-Data-Dumper
4.安装丢失的Libtinfo.So.5库,sudo yum install ncurses-compat-libs
5.安装php所需的库文件Libnsl.So.1,sudo yum install libnsl
6.执行安装,./bitnami-lampstack-7.1.25-0-linux-x64-installer.run
一路yes,安装到/lamp目录
7.配置,到lamp目录下,执行./ctlscript.sh status查看服务启动状况
启停服务:./ctlscript.sh (start|stop|restart|status) mysql/apache
8.登陆mysql,/lamp/mysql/bin/mysql -uroot -p123
9.设置允许远程访问:
a.在/lamp/mysql/文件夹下编辑my.cnf文件,改bind-address=*
b登录mysql,. /lamp/mysql/bin/mysql -uroot -p123,执行以下语句:
 grant all privileges on *.* to root@"%" identified by "Yss12345" with grant option;
flush privileges;
10.启动php
执行/lamp/php/sbin/php-fpm

三、搭建PHP网站(PHPOK内容管理系统)

1.在/lamp/apache2/htdocs下新建phpok文件夹,mkdir phpok
2.给phpok文件夹赋予权限,chmod -R 777 phpok
3.将PHPOK_5.0.055.zip程序上传到phpok文件夹
4.解压,unzip PHPOK_5.0.055.zip
5.在客户机浏览器输入:http://192.168.61.132/phpok进入程序安装界面

四、附加说明

  • 网络管理

停用某块网卡:

ifdown ens33
启动某块网卡:

ifup ens33

所有网卡重启:
方式一:/etc/init.d/network restart
方式二:systemctl restart network

dns服务器设置:
编辑配置文件:vi /etc/resolv.conf
修改配置文件内容:nameserver 8.8.8.8

你可能感兴趣的:(服务器操作系统实战资料,服务器,linux,运维)