本人前端开发,对于服务器了解比较少,奈何公司要求,做了运维的动作,在这里记录一下centos 7 服务器搭建服务器流程;
以下内容均来自百度,亲测可用
搭建.net环境
http://www.cnblogs.com/xingbo/p/5799542.html
连接中开启防火墙步骤因为版本问题不可用,可参照http://blog.youkuaiyun.com/Joe68227597/article/details/75207859
php环境搭建
http://www.cnblogs.com/zakun/p/5840073.html
http://blog.youkuaiyun.com/chenxiabinffff/article/details/51612149
http://www.cnblogs.com/doseoer/p/5350944.html
通过yum安装的php版本太低安装最新版
http://blog.youkuaiyun.com/ityang_/article/details/53980190
编译安装php http://www.jb51.net/article/109228.htm
编译安装apache http://blog.youkuaiyun.com/lyp256/article/details/55090282
php伪静态配置规则
Linux里的httpd默认开启伪静态的,不小心关了,可以参考下
https://www.howtoing.com/how-to-set-up-mod-rewrite-for-apache-on-centos-7/
多域名配置
*这里参考的apache 里面的配置文件写入的,亲测可用
vim /etc/httpd/conf.d/vhost.conf
**多域名配置**
*这里参考的apache 里面的配置文件写入的,亲测可用
vim /etc/httpd/conf.d/vhost.conf
<VirtualHost *:8080>
DocumentRoot "/var/www/html"
ServerName www.emple.com
DirectoryIndex index.html index.php
</VirtualHost>
<Directory "/var/wwww/html">
Options +Includes -Indexes
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>*
<VirtualHost *:8080>
DocumentRoot "/var/www/html/test1"
ServerName aa.emple.com DirectoryIndex index.html index.php
</VirtualHost>
<Directory "/var/wwww/html/test1">
Options +Includes -Indexes
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
记录一下服务的路径
vim /usr/jexus/siteconf/default jexus服务配置文件
vi /etc/httpd/conf/httpd.conf httpd配置文件路径
sudo /usr/jexus/jws start 启动jexus 命令这个不是通过yum 安装的所以启动起来比较麻烦
安装mysql
http://www.linuxidc.com/Linux/2016-09/135288.htm
在linux中权限问题比较重要,新建用户配权限最好通过命令行创建
附mysql用法
http://blog.youkuaiyun.com/lemon_tree12138/article/details/46562769
mysql 大小写敏感 (可是我做的是项目迁移,所以只能是指mysql不区分大小写)
http://www.cnblogs.com/xinhuaxuan/p/6537879.html