[JAVA] A memo to do for the time being when building CentOS 6 series with VirtualBox

basic configuration

If you build Linux with VirtualBox, you can put it in for the time being

It's annoying if the IP changes every time you start up

# vi /etc/sysconfig/network-scripts/ifcfg-eth1
    IPADDR=192.168.56.102
    BOOTPROTO=static
    ONBOOT=yes

Proxy settings (if required)

Assuming that the proxy server is proxy.ex.co.jp, port 8080

# vi /etc/environment
    http_proxy="http://proxy.ex.co.jp:8080/"
    HTTP_PROXY="http://proxy.ex.co.jp:8080/"
    https_proxy="https://proxy.ex.co.jp:8080/"
    HTTPS_PROXY="https://proxy.ex.co.jp:8080/"
    ftp_proxy="ftp://proxy.ex.co.jp:8080/"
    FTP_PROXY="ftp://proxy.ex.co.jp:8080/"

Is there a network restart (or ifup / down)?

# service network restart

Packages that I always put in

# yum -y install wget gzip perl lsof sysstat 

If you use the main machine firmly, it will be easier later if you add the following in addition to the above

yum -y nc bind-utils yum-utils ntc

Poor guy who somehow has become a habit

# setenforce 0
# vi /etc/selinux/config
    SELINUX=disabled

If you want the time to be accurate

# yum -y install ntp
# vi /etc/ntp.conf
    centos.Comment out the pool and put in NICT
    server ntp.nict.jp

# chkconfig ntpd on
# service ntpd start
# ntpq -p

# date +"%Y-%m-%d %H:%M:%S %Z"

Language system

Java

https://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk

The URL may change. For the time being, the JDK download page Since you have to accept it manually, drop it on your terminal and then send SCP

# rpm -i jdk-8u191-linux-i586.rpm

Add path

# vi /etc/profile
    export JAVA_HOME=/usr/java/default
    export PATH=$PATH:$JAVA_HOME/bin
    export
    CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

I get angry that tool.jar is not found well

Ruby

# yum -y install ruby

If you want to use rbenv, refer to the official website

Service system

Make it a web server with Apache

# yum -y install httpd
# chkconfig httpd on
# iptables -A INPUT -p tcp --sport 80 -j ACCEPT
# /etc/init.d/iptables restart
# service httpd start

Make it a MySQL server

# yum -y install mysql-server
# chkconfig mysqld on
# iptables -A INPUT -p tcp --sport 3306 -j ACCEPT
# /etc/init.d/iptables restart
# service mysqld start

Others: Those who have touched

If you want to play with SNMP

# yum -y install net-snmp net-snmp-utils

If you want to play with WordPress (single server)

# yum -y install httpd php php-mysql mysql wget

# chkconfig httpd on
# chkconfig mysqld on
# chkconfig --list | grep -e httpd -e mysql
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
# 

# vi /etc/php.ini
Time zone"Asia/Tokyo"change to

# service httpd start
# service mysqld start
# vi /var/www/html/phpinfo.php
    <?php
        phpinfo();
    ?>

Create a suitable wordpress schema and user in mysql

# mysql -uroot -p

mysql > CREATE DATABASE wordpress
mysql > GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost

Drop the WordPress package somewhere in / tmp (check http://ja.wordpress.org/releases/ for the version)

# wget https://ja.wordpress.org/wordpress-4.9.8-ja.tar.gz
# tar zxf wordpress-4.9.8-ja.tar.gz
# cp -r wordpress /var/www/
# chown -R apache.apache /var/www/wordpress
# vi /etc/httpd/conf/httpd.conf
DocumentRoot"/var/www/wordpress"To
Directory tag attributes"/"To"/var/www/wordpress"To
Edit AllowOverride in the same tag to All
# service httpd restart

All you have to do is set the DB from the web screen

Memorandum of what you want to add (2018/11/15)

--Tomcat installation, Apache integration ~~ I may not do it recently ~~ --Python installation --ZCS (The latest one is sure to make a repository and yum, but the setup should be a shell anyway)

Recommended Posts

A memo to do for the time being when building CentOS 6 series with VirtualBox
Building a DLNA server on Ubuntu (just move for the time being)
What to do when CentOS cannot be started with VirtualBox on Catalina
Learning memo when learning Java for the first time (personal learning memo)
Command to try using Docker for the time being
How to set chrony when the time shifts in CentOS7
Hello World with Ruby extension library for the time being
With the software I've been making for a long time ...
Modeling a Digimon with DDD for the first time Part 1
[Rails] What to do when the view collapses when a message is displayed with the errors method
[Memo] Run Node.js v4.4.5 on CentOS 4.9 / RHEL4 (i386) for the time being (gcc-4.8 and glibc2.11 on LinuxKernel 2.6.9)
What to do when Maven says "For more information, please recompile with the -Xlint: unchecked option"
[WSL] Solution for the phenomenon that 404 is displayed when trying to insert Java with apt (personal memo)
[IOS] What to do when the image is filled with one color
For the time being, run the war file delivered in Java with Docker
Glassfish tuning list that I want to keep for the time being
[First Java] Make something that works with Intellij for the time being
Introduction to java for the first time # 2
What to do when a javax.el.PropertyNotWritableException occurs
I want you to use Scala as Better Java for the time being
A memorandum when building an environment with Ruby3.0 x Rails6.1 x Docker x CentOS Stream
[Rails] When transitioning to a page with link_to, move to the specified location on the page
What to do when is invalid because it does not start with a'-'
How to share on the host side (windows) and guest side (CentOS 7) with VirtualBox
WELD-001408: What to do when Unsatisfied dependencies for type Bean with qualifiers @Default
[Memo] Create a CentOS 8 environment easily with Docker
Set the time of LocalDateTime to a specific time
Install Amazon Corretto (preview) for the time being
How to build a Jenkins server with a Docker container on CentOS 7 of VirtualBox and access the Jenkins server from a local PC
Use Java external library for the time being
Run Dataflow, Java, streaming for the time being
How to delete the tweet associated with the user when you delete it at the same time
A memo that I was addicted to when making batch processing with Spring Boot
[For beginners] Where to review when a class cannot be found at compile time
A story about PKIX path building failed when trying to deploy to tomcat with Jenkins
What to do when routing settings do not work after building Docker environment with Laravel
How to delete child elements associated with a parent element at the same time
A memo when "I do not get a certificate error with a self-signed certificate using Java's Keytool"
A warning is displayed when trying to use a huge integer with the special variables $ 1, $ 2, $ 3 ...
<Dot installation> What to do if you cannot proceed due to an error when building a development environment for Rails learning.
What to do when The SSL certificate has expired
Things to watch out for when creating a framework
What to do when a null byte error occurs
What to do when rails creates a 〇〇 2.rb file
Oreore certificate https (2020/12/19) for the first time with nginx
Try running Spring Cloud Config for the time being
How to make a mod for Slay the Spire
A memo to check when you try to use Lombok
How to study kotlin for the first time ~ Part 2 ~
How to study kotlin for the first time ~ Part 1 ~
A summary of what Java programmers find when reading Kotlin source for the first time
A story stuck with an error when building Vagrant + Virtulbox CentOS7.8 and creating a shared folder
Solution for the error "no basic auth credentials" when pushing a Docker container to Heroku
Access Web API on Android with Get and process Json (Java for the time being)
[Rails Tutorial Chapter 2] What to do when you make a mistake in the column name
Implemented a strong API for "I want to display ~~ on the screen" with simple CQRS
How to reduce the load on the program even a little when combining characters with JAVA