I have been switching jobs for nearly two months. I have changed my career this time and will no longer work in the information security field. Therefore, I may not write any questions about information security in my Blog, some O & M and team management experience will be recorded in the future. Recently, I was migrating a java-based webgame from windows to Linux
I have been switching jobs for nearly two months. I have changed my career this time and will no longer work in the information security field. Therefore, I may not write any questions about information security in my Blog, some O & M and team management experience will be recorded in the future.
Recently, I was migrating a java-based webgame from windows to Linux. this architecture uses nginx for load balancing, distributing requests from different applications to two tomcat servers, 2nd tomcat servers running the game are always inaccessible. it took two days to build the environment and debug the game, the game map cannot be loaded only when the machine configuration is too low (the game map is successfully loaded once the high-end 2U machine is changed ).
I found a 2U slave machine. I logged on to the server and found that gcc was not installed. yum could not be used properly because it was not registered. I recorded the solution for future viewing and encountering the same problems.
1. delete the default yum of RHEL.
[Root @ localhost ~] # Rpm-qa | grep yum
Yum-updatesd-0.9-2.el5
Yum-metadata-parser-1.1.2-2.el5
Yum-rhn-plugin-0.5.3-30.el5
Yum-3.2.19-18.el5
Yum-security-1.1.16-13.el5
Rpm? E yum * -- nodeps
2. download and install centos yum
Wget http://mirrors.sohu.com/centos/5.5/ OS /i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
Wgethttp: // response
Wget http://mirrors.sohu.com/centos/5.5/ OS /i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[Root @ localhost ~] # Rpm-ivh yum-3.2.22-26.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
Warning: yum-3.2.22-26.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ######################################## ### [100%]
1: yum-metadata-parser ################################### ####### [1, 33%]
2: yum-fastestmirror ##################################### ###### [67%]
3: yum
3. add an image in/etc/yum. repos. d/rhel-debuginfo.repo
Vi/etc/yum. repos. d/rhel-debuginfo.repo
Add the following content:
[Base]
Name = Red Hat Enterprise Linux $ releasever-Base
Baseurl = http://mirrors.sohu.com/centos/5.5/ OS /?basearch/
Gpgcheck = 1
[Update]
Name = Red Hat Enterprise Linux $ releasever-Updates
Baseurl = http://mirrors.sohu.com/centos/5.5/updates/?basearch/
Gpgcheck = 1
[Extras]
Name = Red Hat Enterprise Linux $ releasever-Extras
Baseurl = http://mirrors.sohu.com/centos/5.5/extras/?basearch/
Gpgcheck = 1
[Addons]
Name = Red Hat Enterprise Linux $ releasever-Addons
Baseurl = http://mirrors.sohu.com/centos/5.5/addons/?basearch/
Gpgcheck = 1
4. download and import the KEY
"/Etc/yum. repos. d/rhel-debuginfo.repo" 16L, 518C written
[Root @ localhost ~] # Cd/etc/pki/rpm-gpg/
[Root @ localhost rpm-gpg] # wget http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
[Root @ localhost rpm-gpg] # rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY *
5. You can use yum to install gcc and then compile nginx.
Yum-y install gcc
Yum-y install gcc-c ++