温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

在海之舟大数据平台上搭建mysql+php开发平台

发布时间:2020-08-12 19:09:39 来源:ITPUB博客 阅读:155 作者:wxh585 栏目:建站服务器

在海之舟大数据平台上搭建mysql+php开发平台

在海之舟大数据平台上搭建mysql+php开发平台

海之舟服务器操作系统基于国产arm64,3399cpu,分a版,b版,a版内置了大量软件,开发接口范例。

操作系统是个.img的文件,在windows7下刷入tf卡,开机即可启动。启动后ssh登陆,操作界面如下。

配置文件设置开机启动

root@bigdataA:/home/zs# nano /etc/rc.local

su - zs -c’/md1/apache-tomcat-8.5.35/bin/startup.sh’

#sleep 5

#su - zs -c’pgxc_ctl -c /home/zs/pgxc_ctl/pgxc_ctl.conf start all’

#/etc/init.d/apache2 start

#/etc/init.d/mysql start

#/etc/init.d/bind9 start

#/etc/init.d/postgresql start

#/etc/init.d/vsftpd start

#/etc/init.d/xinetd start

#/etc/init.d/ntp start

exit 0

/etc/init.d/apache2 start

/etc/init.d/mysql start

前的#去掉,mysql,apache2,即开机自动启动,

root@bigdataA:/home/zs# netstat -an

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

tcp 0 256 192.168.1.125:22 192.168.1.6:49733 ESTABLISHED

tcp6 0 0 :::80 ::???? LISTEN

tcp6 0 0 :::22 ::???? LISTEN

udp 0 0 192.168.1.125:123 0.0.0.0:*

udp 0 0 127.0.0.1:123 0.0.0.0:*

udp 0 0 0.0.0.0:123 0.0.0.0:*

udp6 0 0 fe80::a8c4:51ff:fe3:123 ::????

udp6 0 0 ::1:123 ::????

udp6 0 0 :::123 ::????

查看启动情况,80,3306,为apache.mysql的端口。自动启动正常。在浏览器中输入:

http://192.168.1.125/a.php

在海之舟大数据平台上搭建mysql+php开发平台

显示php 正常。

修改/var/www/html/下的文件即可进行php开发。

以下进入数据库

root@bigdataA:/home/zs# mysql -v

Welcome to the MariaDB monitor. Commands end with ; or \g.

Your MariaDB connection id is 39

Server version: 10.1.41-MariaDB-0+deb9u1 Debian 9.9

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Reading history-file /root/.mysql_history

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

切换数据库

MariaDB [(none)]> use mysql

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [mysql]>

MariaDB [mysql]> SHOW DATABASES;--------------

SHOW DATABASES

±-------------------+

| Database |

±-------------------+

| information_schema |

| mysql |

±-------------------+

2 rows in set (0.00 sec)

MariaDB [mysql]>

MariaDB [mysql]> CREATE DATABASE example;

CREATE DATABASE example

Query OK, 1 row affected (0.00 sec)

MariaDB [mysql]> SHOW DATABASES;

SHOW DATABASES

±-------------------+

| Database |

±-------------------+

| example |

| information_schema |

| mysql |

±-------------------+

3 rows in set (0.00 sec)

MariaDB [mysql]> use example;

MariaDB [example]>CREATE TABLE student (id int,name varchar(20));

CREATE TABLE student (id int,name varchar(20))

Query OK, 0 rows affected (0.11 sec)

常用命令:

#pwd

/home/zs

root@bigdataA:/home/zs# cd /root

root@bigdataA:~# ls

查看网络配置

root@bigdataA:~# ifconfig -a

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet 192.168.1.125 netmask 255.255.255.0 broadcast 192.168.1.255

inet6 fe80::a8c4:51ff:fe3e:aeda prefixlen 64 scopeid 0x20

ether aa:c4:51:3e:ae:da txqueuelen 1000 (Ethernet)

RX packets 4304 bytes 282205 (275.5 KiB)

RX errors 0 dropped 3683 overruns 0 frame 0

TX packets 335 bytes 35961 (35.1 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

device interrupt 24

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536

inet 127.0.0.1 netmask 255.0.0.0

inet6 ::1 prefixlen 128 scopeid 0x10

loop txqueuelen 1 (Local Loopback)

RX packets 8 bytes 490 (490.0 B)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 8 bytes 490 (490.0 B)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST> mtu 1500

ether 28:ed:e0:62:54:0c txqueuelen 1000 (Ethernet)

RX packets 0 bytes 0 (0.0 B)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 0 bytes 0 (0.0 B)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@bigdataA:~#

可看到预置的软件,启用即可。

root@bigdataA:/home/zs# nano /etc/rc.local

su - zs -c’/md1/apache-tomcat-8.5.35/bin/startup.sh’

#sleep 5

#su - zs -c’pgxc_ctl -c /home/zs/pgxc_ctl/pgxc_ctl.conf start all’

#/etc/init.d/apache2 start

#/etc/init.d/mysql start

#/etc/init.d/bind9 start

#/etc/init.d/postgresql start

#/etc/init.d/vsftpd start

#/etc/init.d/xinetd start

#/etc/init.d/ntp start

exit 0

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI