Linux Server Software Installation memo

Source: Internet
Author: User

1.Centos installing MySQL
1--installation2Yum install mysql-server Uninstall YUM-E mysql-Server3--set to boot4 chkconfig mysqld on5--start MySQL6 Service mysqld Start7--Set Root password8mysqladmin-u root password ' xxx '9 #双机热备TenGRANT REPLICATION SLAVE on * * to ' backup ' @ ' 192.168.1.33 ' identified by ' backup_xxx '; One #一般账号 A--grant all privileges on * * to ' username ' @ ' localhost ' identified by ' password '; - flush Privileges; - garbled: the [Mysqld] - #add - default-character-set =UTF8 -Character-set-server =UTF8 +Collation-server =Utf8_general_ci -Init_connect = ' SET collation_connection = Utf_general_ci ' +Init_connect = ' SET NAMES UTF8 ' A[Mysqld_safe]
2. Installing Redis
wget http://download.redis.io/releases/redis-2.8.7.tar.gz  or  /HTTP download.redis.io/releases/redis-2.6.17.tar.gzTar-&& make install  
3. Start memcached
Memcached-d-M 100-u root-p 11211-p/tmp/memcached.pid
4. Firewall:
1 Iptables:2 start Iptables3 Service iptables Start4Iptables--list//* View Iptables rule set *//5 Here's what iptables looks like when planning is not defined:6 Chain INPUT (policy ACCEPT)7 Target prot opt source destination8 Chain FORWARD (policy ACCEPT)9 Target prot opt source destinationTen Chain OUTPUT (policy ACCEPT) One Target prot opt source destination AHow to open/close the specified port - For example: - turn on port 81: theIptables-i input-i eth0-p TCP--dport 81-J ACCEPT -Iptables-i output-o eth0-p TCP--sport 81-J ACCEPT - Turn off Port 81: -Iptables-i input-i eth0-p TCP--dport 81-J DROP +Iptables-i output-o eth0-p TCP--sport 81-J DROP - and then save +/etc/rc.d/init.d/iptables Save A You can use the lsof command to see if a port is open. View ports can be used in this way. at I'll take Port 81 as an example: -lsof-i:81 -If there is a display the instructions are open. If no indication is not open
5. Environment variables
1 Tomcat JVM configuration--catalina.bat/catalina.sh2windows3 Set java_opts =- xmx512m-xms512m-xx:maxpermsize=256m4linux5 java_opts = "-server-xmx400m -xms400m-xmn128m-xx:maxpermsize=128m-xx:permsize=128m "
6. Direct Project Access
1 "Tomcat Direct Access project- Remove project name on Access path"2 Modify tomcat_home/conf/server.xml3 < host> add  <context path= "" docbase= "Project Path" reloadable= "true"/>4 path for access path, The same as the Request.getcontextpath () return value.
7.Nginx configuration:

Installing Pcre-devel Openssl-devel

1 http{2  #...3 gzip on;4 Gzip_min_length 1k;5Gzip_buffers 1664k;6Gzip_http_version 1.1;7Gzip_comp_level 4;8Gzip_types text/plain text/css application/xml image/png, # ...9 gzip_vary on;Ten sendfile on; One client_max_body_size 1024m; #附件上传 A Upstream e_learning{ -Server 192.168.1.30:8080; -Server 192.168.1.31:8080; the Ip_hash; -     } - server{ -Listen 80; +server_name 192.168.1.34; - index index.jsp; +Location/ { A index index.jsp; atProxy_pass http://e_learning; - proxy_set_header Host $host; -Proxy_set_header xreal_ip $remote _addr; -Proxy_set_header x-forwarded-For $proxy _add_x_forwarded_for; -         } -Location ^~/upload/ { in expires 10d; -root/var/e_learning; to         } +Location ^~/VOD { -Proxy_pass http://192.168.1.36:1935/vod/; the proxy_set_header Host $host; *Proxy_set_header xreal_ip $remote _addr; $Proxy_set_header x-forwarded-For $proxy _add_x_forwarded_for;Panax Notoginseng         } -Location ~*\. (gif|jpg|png|js|CSS) $ { the expires 10d; +Proxy_pass http://e_learning; A proxy_set_header Host $host; theProxy_set_header xreal_ip $remote _addr; +Proxy_set_header x-forwarded-For $proxy _add_x_forwarded_for; -         } $     } $}

Linux Server Software Installation memo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.