Quick to set up the web server environment on centos

#install Apache+MySQL+PHP+ZIP
yum -y install httpd php mysql mysql-server php-mysql zip unzip

# start httpd service
service httpd start

# start mysql service
service mysqld start

# set mysql local password for root
mysqladmin -u root password ‘wc20080512‘

# install apache modules
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

# install php extensions
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath

# install mysql plugins
yum -y install mysql-connector-odbcmysql-devel libdbi-dbd-mysql

#mount and format disk

fdisk /dev/sdb

mkfs -t ext4 /dev/sdb1
mkdir /extends
mount /dev/sdb1 /extends
vi /etc/fstab

#install ftp server and config

yum install vsftpd
/usr/sbin/adduser -d /extends/ftp -s /sbin/nologin ftpuser
passwd ftpuser
chmod 775 /extends/ftp

#config remote access to mysql

GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘cuit2010211079..‘ WITH GRANT OPTION;
FLUSH PRIVILEGES;

#optimize config files

vi /etc/httpd/conf/httpd.conf
vi /etc/my.cnf
vi /etc/php.ini

#add iptables regulars
vi /etc/sysconfig/iptables
-A INPUT -p tcp --dport 80 -j ACCEPT
-I INPUT -p tcp --dport 3306 -j ACCEPT
/var/lib/mysql

#shutdown selinux temporary
setenforce 0

Now, start to enjoy it!

时间: 2024-10-10 00:00:02

Quick to set up the web server environment on centos的相关文章

Lua xavante WEB server实现xmlrpc服务器端

xavante xavante是一个使用lua实现的遵守http1.1的web server,支持wsapi. 依赖库: xavante核心 -- lua, copas(纯lua编写,网络连接coroutine处理), luasocket处理网络连接. xavante file handler -- luaFileSystem 此项目属于kepler项目的一个子项目,见官网地址: http://keplerproject.github.io/xavante/manual.html github上

The different between app server and web server

web server: handles http request app server: handle the business logic of the application 1) web server A Web server mainly deals with sending HTML for display in a Web browser.When a request comes into the Web server, the Web server simply passes th

Setting up Django and your web server with uWSGI and nginx

https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html Setting up Django and your web server with uWSGI and nginx This tutorial is aimed at the Django user who wants to set up a production web server. It takes you through the steps re

20150924 Web Server(Http服务)

第一:Web Service基础 @1:补充  TCP.UDP OSI模型,TCP(应用.表示.会话)资源子网,下四具为通信子网. 前三层在用户进程进行(用户空间用户程序,后四层在内核中. Ip地址主机至主机(通信双方) 数据链路层mac设备到设备之间的通信 TCP/IP提供进程地址(端口号) TCP:面向链接在通信前创建虚拟链路(三次握手),通信完成后 还要拆除链路.可提供可靠流协议.0-65535 UDP:用户数据报协议(User dataGram Protocol),无链接协议( 无法保证

[r]Setting up Django and your web server with uWSGI and nginx

Setting up Django and your web server with uWSGI and nginx This tutorial is aimed at the Django user who wants to set up a production web server. It takes you through the steps required to set up Django so that it works nicely with uWSGI and nginx. I

Notes on PEP333 (Python Web Server Gateway Interface)

This note is about PEP3333- Python Web Server Gateway Interface. Refer to (Source: http://legacy.python.org/dev/peps/pep-3333/) for the complete description.  1. From the Application/Framwork side The application object is simply a callable object th

Using OAuth 2.0 for Web Server Applications, verifying a user's Android in-app subscription

在写本文之前先说些题外话. 前段时间游戏急于在GoolePlay上线,明知道如果不加Auth2.0的校验是不安全的还是暂时略过了这一步,果然没几天就发现后台记录与玩家实际付费不太一致,怀疑有玩家盗刷游戏元宝等,并且真实的走过了GooglePlay的所有支付流程完成道具兑换,时间一长严重性可想而知.经过查阅大量google官方文档后把代码补上,并在这里记录下OAuth 2.0 的使用,Google提供了OAuth2.0的好几种使用用途,每种使用方法都有些不同,具体可以看下这篇博客.在这里只写OAu

Apache Web Server 本地推送命令

/*****openssl 系统命令    x509输入文件类型       -in 是参数输入文件   -inform本地文件     -out是参数  是生成文件  ***/ openssl    x509  -in  *.cer  -inform  der  -out *.pem openssl  pkcs12  -nocets  -out  *.pem  -in  *.p12 /*****   >是 表示连接   ****/ cat  *.pem  *.pem  >  *.pem 在终

The web application you are attempting to access on this web server is currently unavailable.......

今天去服务器安装了个.net 4.0 framework(原本有1.0和2.0的),配置好站点后,选择版本为4.0,访问出错,错误代码如下 Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web brows