Install virtual machine under mac
Required software
VirtualBox-5.1.30-OSX.dmg virtual machine
CentOS-7-x86_64-Everything-1708.iso
mysql-5.6.31.tar.gz
wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.31.tar.gz
5.7 address
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.20.tar.gz
wget http://php.net/get/php-7.0.27.tar.gz/from/a/mirror
Continue to add...
step
One: Install the virtual machine VB, mine is the mac version, and install centos7, according to your own computer system
1.1 New:
Keep singing all the way, and the creation is complete
Select start, select the image file
Choose install, press Enter, it will install automatically
Choose a language
Installation location and network and host name in turn select settings
turn on
Set root password and create user
Can create users to choose
Wait for the installation by yourself, and restart after completion
Log in to wxq account
Switch to administrator account
Ping to see if the network is smooth:
If it is not smooth, you need to configure the network, go to the configuration file to modify
Write configuration file content
Some configuration files may be different, but basically there is no need to delete, add and modify departments
The last ONBOOT=yes turns on network access
Note: ipaddr here is based on the address displayed when you connect to the network locally. In your last paragraph, change it. For example, mine is 192.168.1.149, and I will change the virtual machine to 150. It’s 255.255 if it is not heavy. 255.0 is basically the same, no need to move
: wp save and exit
Sudo systemctl restart network.service
ip addr view IP address
Enable remote to allow remote login to the virtual machine system. The remote is port 22. If an error is reported, you need to switch to the root user and restart the firewall after enabling it, as follows:
The last key part, in the virtual machine vb settings, select the bridge network card for the network, and then restart the virtual machine to be able to remotely access
At this point, you can log in through the local ssh
Or log in directly with ssh [email protected]
Step two:
2.1 install software
Use yum to install, here is a demonstration of installing vim
yum install vim
2.2 Install wget, because it needs to install lamp series of installation packages, such as php, mysql, etc.
yum install wget
2.3 Install php, other software is similar, just install it in the root directory, according to personal needs
wget http://php.net/get/php-7.0.27.tar.gz/from/a/mirror
tar -zxvf mirror
2.4 Install the dependency packages needed for compilation and installation, pay attention to the letter l
sudo yum install gcc gcc++ libxml2-devel
2.5 Go to the php decompression directory and compile
cd php-7.0.27
2.6 Compile and install
make
make install
Can be together
make && make install
2.7 Test whether the installation is successful
Write php file
At this time, php is not a global variable, you need to find the directory of the php execution file when running, and then test the written file
Install the dependent software required by mysql
yum install cmake gcc-c++ ncurses-devel perl-Data-Dumper boost boost-doc boost-devel
Sudo if not root user
Then unzip it, go to the unzip package directory to cmake
cmake \
- DCMAKE_INSTALL_PREFIX=/usr/local/mysql``\
- DMYSQL_DATADIR=/mydata/mysql/data``\
- DSYSCONFDIR=/etc``\
- DMYSQL_USER=mysql \
- DWITH_MYISAM_STORAGE_ENGINE=1 \
- DWITH_INNOBASE_STORAGE_ENGINE=1 \
- DWITH_ARCHIVE_STORAGE_ENGINE=1 \
- DWITH_MEMORY_STORAGE_ENGINE=1 \
- DWITH_PARTITION_STORAGE_ENGINE=1 \
- DWITH_READLINE=1 \
- DMYSQL_UNIX_ADDR=/var/run/mysql/mysql.sock \
- DMYSQL_TCP_PORT=3306 \
- DENABLED_LOCAL_INFILE=1 \
- DENABLE_DOWNLOADS=1 \
- DEXTRA_CHARSETS=all \
- DDEFAULT_CHARSET=utf8 \
- DDEFAULT_COLLATION=utf8_general_ci \
- DENABLE_DTRACE=0 \
- DMYSQL_MAINTAINER_MODE=0 \
- DWITH_SSL:STRING=bundled \
- DWITH_ZLIB:STRING=bundled .
Note here that there is a space plus a dot at the end.
Otherwise the execution will report an error
Compile and install:
sudo make install
Start mysql using mysqld command
to be continued. . . .
Note: When setting the network card, the normal setting can be passed through the first installation, but the second setting fails, according to this setting
First configure the virtual machine to bridge mode, and then turn it on
Before you plan to modify the virtual machine IP, first ping 127.0.0.1 to see if the network card is good (if 127.0.0.1 fails to ping, then the network card is broken...)
[ root@localhost /]# ping 127.0.0.1
PING 127.0.0.1(127.0.0.1)56(84) bytes of data.64 bytes from127.0.0.1: icmp_seq=1 ttl=64 time=0.106 ms
64 bytes from127.0.0.1: icmp_seq=2 ttl=64 time=0.095 ms
64 bytes from127.0.0.1: icmp_seq=3 ttl=64 time=0.097 ms
64 bytes from127.0.0.1: icmp_seq=4 ttl=64 time=0.073 ms
64 bytes from127.0.0.1: icmp_seq=5 ttl=64 time=0.058 ms
64 bytes from127.0.0.1: icmp_seq=6 ttl=64 time=0.097 ms
64 bytes from127.0.0.1: icmp_seq=7 ttl=64 time=0.375 ms
^ C64 bytes from127.0.0.1: icmp_seq=8 ttl=64 time=0.733 ms
64 bytes from127.0.0.1: icmp_seq=9 ttl=64 time=0.095 ms
64 bytes from127.0.0.1: icmp_seq=10 ttl=64 time=0.102 ms
^ C
- - - 127.0.0.1 ping statistics ---10 packets transmitted,10 received,0% packet loss, time 9006ms
rtt min/avg/max/mdev =0.058/0.183/0.733/0.202 ms
[ root@localhost /]#
Before setting a static IP, you can take a look at the network card you are currently on:
[ root@localhost /]# ifconfig
ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.121 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::9474:4a7c:66fd:8d90 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:e5:c1:96 txqueuelen 1000(Ethernet)
RX packets 4436 bytes 372786(364.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 871 bytes 147085(143.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1(Local Loopback)
RX packets 16 bytes 1320(1.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16 bytes 1320(1.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0[root@localhost /]#
[ root@localhost /]# cd /etc/sysconfig/network-scripts/ #Pay attention to the cd and "/Space between "etc"
[ root@localhost network-scripts]#
[ root@localhost network-scripts]# ls #View network-All files under scripts
ifcfg-ens32 ifdown-eth ifdown-isdn ifdown-sit ifup ifup-ib ifup-plip ifup-routes ifup-tunnel network-functions-ipv6
ifcfg-lo ifdown-ib ifdown-post ifdown-Team ifup-aliases ifup-ippp ifup-plusb ifup-sit ifup-wireless
ifdown ifdown-ippp ifdown-ppp ifdown-TeamPort ifup-bnep ifup-ipv6 ifup-post ifup-Team init.ipv6-global
ifdown-bnep ifdown-ipv6 ifdown-routes ifdown-tunnel ifup-eth ifup-isdn ifup-ppp ifup-TeamPort network-functions
[ root@localhost network-scripts]#
Edit with vi
[ root@localhost network-scripts]# vi ifcfg-ens32
【Click i to insert and then Esc and enter:wq to save]
[ root@localhost network-scripts]# vi ifcfg-ens32
TYPE="Ethernet"
BOOTPROTO="static" #Enable static IP address
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens32"
UUID="17e371b3-5107-4d72-a58f-e8f71396fd68"
DEVICE="ens32"
ONBOOT="yes"
IPADDR=“192.168.0.121”
GATEWAY=“192.168.0.1”
modify:
BOOTPROTO=“static” #Enable static IP address
Add:
IPADDR=“192.168.0.121” #Set IP address
GATEWAY=“192.168.0.1” #Set the gateway, check the local computer, you can see the gateway
[Note] Save after setting!
Then restart the network:
[ root@localhost ~]# service network restart #Restart network
Restarting network(via systemctl):[ OK ][root@localhost ~]#
[ root@localhost ~]# ping 192.168.0.107 #ping the IP in the LAN is normal
PING 192.168.0.107(192.168.0.107)56(84) bytes of data.64 bytes from192.168.0.107: icmp_seq=1 ttl=64 time=0.759 ms
64 bytes from192.168.0.107: icmp_seq=2 ttl=64 time=1.07 ms
64 bytes from192.168.0.107: icmp_seq=3 ttl=64 time=0.615 ms
^ C
- - - 192.168.0.107 ping statistics ---3 packets transmitted,3 received,0% packet loss, time 2004ms
rtt min/avg/max/mdev =0.615/0.816/1.076/0.195 ms
[ root@localhost ~]# ping www.baidu.com #Ping Baidu domain still not working
ping: www.baidu.com: Name or service not known #Got this error
"Ping: www.baidu.com: Name or service not known" error solution
The first step is to view ONBOOT:
[ root@localhost ~]# cd /etc/sysconfig/network-scripts/[root@localhost network-scripts]# ls
ifcfg-ens32 ifdown-bnep ifdown-ippp ifdown-post ifdown-sit ifdown-tunnel ifup-bnep ifup-ippp ifup-plip ifup-ppp ifup-Team ifup-wireless network-functions-ipv6
ifcfg-lo ifdown-eth ifdown-ipv6 ifdown-ppp ifdown-Team ifup ifup-eth ifup-ipv6 ifup-plusb ifup-routes ifup-TeamPort init.ipv6-global
ifdown ifdown-ib ifdown-isdn ifdown-routes ifdown-TeamPort ifup-aliases ifup-ib ifup-isdn ifup-post ifup-sit ifup-tunnel network-functions
[ root@localhost network-scripts]# vi ifcfg-ens32
TYPE="Ethernet"
BOOTPROTO="static" #Enable static IP address
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens32"
UUID="17e371b3-5107-4d72-a58f-e8f71396fd68"
DEVICE="ens32"
ONBOOT="yes"
IPADDR=“192.168.0.121”
GATEWAY=“192.168.0.1”
Found that ONBOOT=”no” has been set to ONBOOT=”yes”
The second step is to check:
The ping command belongs to the ICMP protocol, and the ping ip address is valid. If you directly ping the website (domain name), you need to configure DNS. Edit and add nameserver as follows:
vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
[Note] Save after setting!
Ping again
[ root@localhost /]# ping www.baidu.com
PING www.a.shifen.com(61.135.169.121)56(84) bytes of data.64 bytes from61.135.169.121(61.135.169.121): icmp_seq=1 ttl=55 time=16.9 ms
64 bytes from61.135.169.121(61.135.169.121): icmp_seq=2 ttl=55 time=25.6 ms
64 bytes from61.135.169.121(61.135.169.121): icmp_seq=3 ttl=55 time=21.6 ms
64 bytes from61.135.169.121(61.135.169.121): icmp_seq=4 ttl=55 time=17.2 ms
64 bytes from61.135.169.121(61.135.169.121): icmp_seq=5 ttl=55 time=22.0 ms
^ C
- - - www.a.shifen.com ping statistics ---5 packets transmitted,5 received,0% packet loss, time 4010ms
rtt min/avg/max/mdev =16.901/20.716/25.652/3.277 ms
[ root@localhost /]#
That's it!
G
M
T
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu |
---|
Text-to-speech function is limited to 200 characters
Options : History : Feedback : Donate | Close |
---|
G
M
T
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu |
---|
Text-to-speech function is limited to 200 characters
Options : History : Feedback : Donate | Close |
---|
G
M
T
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu |
---|
Text-to-speech function is limited to 200 characters
Options : History : Feedback : Donate | Close |
---|
G
M
T
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu |
---|
Text-to-speech function is limited to 200 characters
Options : History : Feedback : Donate | Close |
---|
G
M
T
Detect languageAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu | AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBengaliBosnianBulgarianCatalanCebuanoChichewaChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEsperantoEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekGujaratiHaitian CreoleHausaHebrewHindiHmongHungarianIcelandicIgboIndonesianIrishItalianJapaneseJavaneseKannadaKazakhKhmerKoreanLaoLatinLatvianLithuanianMacedonianMalagasyMalayMalayalamMalteseMaoriMarathiMongolianMyanmar (Burmese)NepaliNorwegianPersianPolishPortuguesePunjabiRomanianRussianSerbianSesothoSinhalaSlovakSlovenianSomaliSpanishSundaneseSwahiliSwedishTajikTamilTeluguThaiTurkishUkrainianUrduUzbekVietnameseWelshYiddishYorubaZulu |
---|
Text-to-speech function is limited to 200 characters
Options : History : Feedback : Donate | Close |
---|
Recommended Posts