When you get a new Linux server, you generally have to go through the following 5 configurations Modify HOSTANME vi /etc/sysconfig/network Modify the mapping between HOSTNAME and IP vi /etc/hosts Turn off firewall service iptables stop Disable the firewall at startup 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 decompressed package of jdk (tar.gz format) to the apps folder of the Linux server 1.3. Unzip the jdk compressed package tar -zxvf xxxxx.gar.gz 1.4. Enter the unzipped JDK and obtain its absolute path pwd 1.5. Configure environment variables vi /etc/profile 1.6. Make environment variables take effect immediately source /etc/profile 1.7. Check whether JDK is configured successfully javac -version 2. Configure tomcat
That is, all components/frameworks/projects downloaded from the Apache official website require JDK environment variable support 2.1. Download tomcat8 from the official website 2.2. Use xftp to upload the tomcat decompression package to the Linux server 2.3. Unzip tomcat tar -zxvf xxxxx.tar.gz 2.4. Start tomcat directly (All Linux and Mac startup files end with .sh) Enter the bin directory of tomcat ./startup.sh Or enter the tomcat directory bin/startup.sh 2.5. Check whether Tomcat is started successfully jps (a command that can only be used after JDK is successfully configured) 2779 Jps: represents the environment variables of JDK 2736 Bootstrap: represents the startup of tomcat 2.6. Stop Tomcat Enter the bin directory of tomcat ./shutdown.sh Enter the tomcat directory bin/shutdown.sh kill -9 2830 (2830 is the process number of Tomcat, which can be obtained dynamically, but it is strongly not recommended and may damage internal data or files)
3. Configure Maven 3.1. Download Maven from Apache official website 3.2. Use xftp tool to upload to Linux server 3.3. Unzip the Maven compressed package tar -zxvf xxxx 3.4. Maven environment variables need to be configured vi /etc/profile Similar to configuring Java environment variables export MAVEN_HOME= export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin Whether it is Java or Maven environment variables, they must be configured before PATH If configured under PATH Because of the problem of loading environment variables, it must be configured before PATH 3.5. Make environment variables take effect immediately source /ect/profile 3.6. Check whether the Maven environment variables are configured successfully mvn -v 3.7. Configure Maven's local repository/Alibaba Cloud image settings.xml !!!!! In all configurations, it is not allowed to change the built-in configuration information. If you need to configure, copy it out Here, a new repository folder is created under home as a local warehouse, and the location of the local warehouse is modified to the absolute path of the local warehouse folder in the setting.xml file: <localRepository>/home/reposiroty</localRepository> Alibaba Cloud Image
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors> 3.8. Configure Maven's target JDK version
The jdk version that comes with maven is 1.5, and the local environment is jdk1.8 Many new methods and classes are added in 1.8, which are not available in 1.5 Maven starts compiling the target version of JDK (1.5) However, the classes brought by 1.8 have been used in the project, and Maven cannot compile it, so an error will be reported. The IDEA development tool will automatically integrate the local JDK environment, that is, after integrating Maven in IDEA (Maven's target compilation version becomes 1.8) But eclipse/MyEclipse will report an error! ! ! !
<profile>
<id>jdk1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile> 4. Configure SVN (server side)
4.1. Install SVN from Linux No need to download from the official website (because Linux has actually integrated SVN, it just needs to be loaded in) As long as Linux comes with its own tools/frameworks/components/projects, you don't need to download them, just install them directly These things that Linux does not have must be installed using the tar.gz compressed package yum -y install: installation command (can only install the built-in linux, non-built-in linux cannot be installed) yum -y install subversion 4.2. Check whether SVN is installed successfully svn --version or subversion --version 4.3. Create a folder (to store the files required for SVN configuration. The following code uses this folder as a demonstration) Create in the home directory mkdir -p svn/svnfile 4.4.svn loads the configuration file (The commands that come with svn are not native commands of Linux) svnadmin create /home/svn/svnfile 4.5. Implement your own configuration Implement your own configuration in the three files in the conf directory Note: When configuring the following three files, all configurations must start from the beginning without any spaces! ! passwd: Configure 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] Username = Password For example: Mike = 123456 authz: Configured the SVN user's permission information (read, write) All permission configurations must be configured under the [groups] tag, otherwise they will not take effect. [/]: Get all users in the passwd file, as long as all users under [users] can be obtained All permission information related to svn users must be configured under the [/] tag, otherwise it will not take effect. Username = rw Mike = rw svnserver.conf: anon-access = read Operations that can be performed when the user is not logged in to SVN (operations that can be performed anonymously) Write: Write here means both reading and writing, usually configured as read read, write, none auth-access = write Operations that can be performed when the SVN user logs in Write: can read and write password-db = passwd Manage the account and password matching mechanism of all SVN users in the passwd file authz-db = authz Manage all SVN users' permissions in the authz file realm = /home/svn/svnfile Specifies the directory where the project is uploaded to SVN, that is, the folder where the project is uploaded to SVN 4.6. Start SVN svnserve -d -r /home/svn/svnfile No error message is seen, indicating successful startup Summarize The above is the configuration method of common software on Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you! You may also be interested in:- Detailed explanation of software configuration using docker-compose in linux
- Learn LINUX software configuration step by step
- Commonly used web server software summary (win+linux)
|