In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to configure common software in Linux, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
When you get a new linux server, you usually have to go through the following five configurations
Modify HOSTANME
Vi / etc/sysconfig/network
Modify the mapping of HOSTNAME and IP
Vi / etc/hosts
Turn off the firewall
Service iptables stop
Turn off the boot of the firewall
Chkconfig iptables off
Restart the linux server
Reboot
1. Configure jdk
1.1. Create an apps directory under the home directory (according to custom)
Mkdir apps
1.2. Use the xftp tool to upload the jdk decompression package (in tar.gz format) to the apps folder of the linux server
1.3. Decompress the compressed package of jdk
Tar-zxvf xxxxx.gar.gz
1.4. Enter the decompressed jdk and get its absolute path
Pwd
1.5. Configure environment variables
Vi / etc/profile
1.6. Make the environment variable effective immediately
Source / etc/profile
1.7. Check whether jdk is configured successfully
Javac-version
two。 Configure tomcat
That is, as long as all components / frameworks / projects downloaded from apache's official website need jdk environment variable support.
2.1. Download tomcat8 from the official website
2.2. Upload the unzipped package of tomcat to the linux server using xftp
2.3. Decompress tomcat
Tar-zxvf xxxxx.tar.gz
2.4. Start tomcat directly
(all linux and Mac startup files end in .sh)
Go to the bin directory of tomcat
. / startup.sh
Or go to the tomcat directory
Bin/startup.sh
2.5. Check whether tomcat starts successfully
Jps (commands that can only be used after jdk has been successfully configured)
2779 Jps: represents the environment variable of jdk
2736 Bootstrap: represents tomcat startup
2.6. Stop tomcat
Enter the bin directory of tomcat
. / shutdown.sh
Go to the tomcat directory
Bin/shutdown.sh
Kill-9 2830 (2830 is the process number of tomcat, which can be obtained dynamically, but is strongly deprecated and may damage internal data or files)
3. Configure maven
3.1. Download maven from the apache official website
3.2. Use the xftp tool to upload to the linux server
3.3. Decompress the maven package
Tar-zxvf xxxx
3.4. Environment variables that need to be configured for maven
Vi / etc/profile
Similar to configuring Java environment variables
Export MAVEN_HOME=
Export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
Whether it is a Java/maven environment variable, it must be configured before PATH
If the configuration is under PATH
Due to loading environment variables, it must be configured before PATH
3.5. Make the environment variable effective immediately
Source / ect/profile
3.6. Check whether the maven environment variable is configured successfully
Mvn-v
3.7. Configure the local repository / Ali cloud image of maven
Settings.xml
! In all configurations, it is not allowed to use the configuration information that comes with it. If configuration is needed, a copy of copy is provided.
Here, create a new repository folder under home as the local repository, and change the location of the local warehouse in the setting.xml file to the absolute path of the local warehouse folder:
/ home/reposiroty
Aliyun image
Nexus-aliyun * Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public
3.8. Configure the target jdk version of maven
The jdk version that comes with maven is 1.5. Just now, the native environment is jdk1.8.
Add many new methods and classes in 1.8, which are not available in 1.5
Maven starts compiling the target version of jdk (1.5)
However, the class included in the 1.8 has been used in the project. If the maven is not compiled, an error will be reported.
IDEA development tools automatically integrate the native jdk environment, that is, after integrating maven in IDEA (the target compiled version of Maven becomes 1.8)
But eclipse/MyEclipse will make a mistake!
Jdk1.8 true 1.8 1.8 1.8
4. Configure svn (server side)
4.1. Install svn from linux
There is no need to download from the official website (because linux has already integrated svn, it just needs to be loaded in)
As long as the tools / frameworks / components / projects that come with linux do not need to be downloaded, you can install them directly.
These things that are not available in linux must be installed using a tar.gz package.
Yum-y install: installation command (only those that come with linux can be installed, not those that are not included)
Yum-y install subversion
4.2. Check whether svn is installed successfully
Svn-version or subversion-version
4.3. Create a folder (used to store the files needed for the configuration of svn, and the following code is demonstrated by this folder)
Create in the home directory
Mkdir-p svn/svnfile
4.4.svn load configuration file
(the command that comes with svn is not native to linux)
Svnadmin create / home/svn/svnfile
4.5. Implement your own configuration
Implement your own configuration with three files in the conf directory
Note: when configuring the following three files, all configurations must start from scratch, without any spaces!
Passwd:
Configured the username and password required by svn
All svn user configurations must be configured under the [users] tag, otherwise they will not take effect.
[users]
User name = password
For example: Mike = 123456
Authz:
Configured permission information for svn users (read, write)
All permission configurations must be configured under the [groups] tag, otherwise they will not take effect.
[/]: get all the users in the passwd file, as long as they are under [users].
All permission information related to svn users must be configured under the [/] tag, otherwise it will not take effect.
User name = rw
Mike = rw
Svnserver.conf:
Anon-access = read
Actions that users can perform when they are not logged into svn (actions that can be performed anonymously)
Write: the write representation here can be read and written. It is generally configured as read here.
Read, write, none
Auth-access = write
Actions that can be performed when a svn user logs in
Write: can both read and write
Password-db = passwd
Transfer the account password matching mechanism of all svn users to the passwd file for management.
Authz-db = authz
Transfer the permissions of all svn users to the authz file for management
Realm = / home/svn/svnfile
Specifies the directory where the project is uploaded to svn, that is, which folder the project is uploaded to svn
4.6. Start svn
Svnserve-d-r / home/svn/svnfile
Failure to see the error message indicates that the startup was successful.
The above is all the contents of the article "how to configure Common Software in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Switch-1# show interface brief
© 2024 shulou.com SLNews company. All rights reserved.