I.MX6 ubuntu-core-14.04 Apache php mysql Qt5

/***************************************************************************
 *           I.MX6 ubuntu-core-14.04 Apache php mysql Qt5
 * 说明:
 *     之前有尝试过12.04版本的,这里再继续尝试一下14.04,看一下有什么不同的
 * 地方。相对前一次的尝试,这次相对来说更深入了一点点,遗憾就是没有吧Qt5跑
 * 起来,虽然编译通过,但运行的时候HDMI上没有显示。
 *
 *                                      2016-11-3 深圳 南山平山村 曾剑锋
 *************************************************************************/

一、参考文档:
    1. I.MX6 Ubuntu core porting
        http://www.cnblogs.com/zengjfgit/p/5405477.html
    2. 树莓派3上安装Qt5
        http://www.mamicode.com/info-detail-1400876.html
    3. Ubuntu 14.04 配置 LAMP+phpMyAdmin PHP(5.5.9)开发环境
        http://blog.csdn.net/tecn14/article/details/27515241
    4. Qt5 从头学(2)--手动构建HelloWold
        http://www.cnblogs.com/csulennon/p/4479236.html
    5. How do i set up the server's fully qualified domain name?
        http://stackoverflow.com/questions/9445772/how-do-i-set-up-the-servers-fully-qualified-domain-name

二、下载地址:
    1. http://mirror1.ku.ac.th/ubuntu-cdimages/ubuntu-core/releases/14.04/release/
    2. ubuntu-core-14.04-core-armhf.tar.gz

三、修改内容:
    1. cat /etc/init/ttymxc.conf
        # tty5 - getty
        #
        # This service maintains a getty on tty5 from the point the system is
        # started until it is shut down again.

        start on runlevel [23] and not-container

        stop on runlevel [!2345]

        respawn
        exec /sbin/getty -L 115200 ttymxc0 vt102
    2. cat /etc/network/interfaces
        # interfaces(5) file used by ifup(8) and ifdown(8)
        # Include files from /etc/network/interfaces.d:
        source-directory /etc/network/interfaces.d
        
        auto eth0
        iface eth0 inet dhcp
            hwaddress ether 70:B3:D5:10:6F:92
    3. cat /etc/passwd
        root::0:0:root:/root:/bin/bash
        daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
        bin:x:2:2:bin:/bin:/usr/sbin/nologin
        sys:x:3:3:sys:/dev:/usr/sbin/nologin
        sync:x:4:65534:sync:/bin:/bin/sync
        games:x:5:60:games:/usr/games:/usr/sbin/nologin
        man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
        lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
        mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
        news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
        uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
        proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
        www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
        backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
        list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
        irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
        gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
        nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
        libuuid:x:100:101::/var/lib/libuuid:
        syslog:x:101:104::/home/syslog:/bin/false
        mysql:x:102:105:MySQL Server,,,:/nonexistent:/bin/false  (mysql默认是没安装的,这是另外安装好的)
        root@localhost:/# 

四、查看情况:
    1. 网络:
        root@localhost:/# ifconfig
        eth0      Link encap:Ethernet  HWaddr 00:04:9f:02:b4:0a  
                  inet addr:10.0.2.12  Bcast:10.0.2.255  Mask:255.255.255.0
                  inet6 addr: fe80::204:9fff:fe02:b40a/64 Scope:Link
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                  RX packets:51 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000 
                  RX bytes:5761 (5.7 KB)  TX bytes:5627 (5.6 KB)

        lo        Link encap:Local Loopback  
                  inet addr:127.0.0.1  Mask:255.0.0.0
                  inet6 addr: ::1/128 Scope:Host
                  UP LOOPBACK RUNNING  MTU:65536  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:0 
                  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

        root@localhost:/# 
    2. 更新:
        apt-get update
    3. 安装mysql(已安装成功):
        apt-get install mysql-server
    4. Vim:
        apt-get install vim
    5. 安装php5,结果自动安装了apache:
        1. apt-get install php5
        2. 上面命令自动安装了apache2
        3. 解决报错:
            1. localhost login: AH00557: apache2: apr_sockaddr_info_get() failed for localhost.localdomain
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
            2. cat /etc/apache2/apache2.conf
                ......
                ServerName <your server name>   # 添加在最后,如果本身有这个字段,修改就OK了
    6. 安装qt5-default1. apt-get install qt5-default
        2. apt-get install make g++
        3. 测试程序:http://zetcode.com/gui/qt5/widgets/
        4. 编译脚本remake.sh:
            #!/bin/bash

            qmake -project
            qmake
            sleep 1
            echo "QT += widgets" >> root.pro
            make
    7. 安装dbus
        1. apt-get install dbus
        2. apt-get install libegl1-mesa-dev
        3. dbus-uuidgen > /var/lib/dbus/machine-id 

 

posted on 2016-11-03 11:17  zengjf  阅读(560)  评论(0编辑  收藏  举报

导航