In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the method of creating an application package for tinyco linux". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of creating an application package for tinyco linux".
On compiling New gcc Suite and dealing with glibc Migration
Compiling GCC may face two requirements environments: 1) generated locally, for example, you need a gcc low version of bootstrap to produce a high version, and 2) from an external crosscompile.
By default, gcc only needs gmp,mpc,mpfr plus gcc for the first time, so that the gcc compiled by enable-language=c,c++ supports stdlibc++-dev but does not have libc-dev, or even binutils. It is not practical if there is no support in the target environment.
The fully available gcc suite goes through many times, in addition to gcc,binutils, and even requires additional compilation of the flex,bison
Here comes the most important question:
The default gcc only comes with libstdc++, which can be added later to replace / overlay the original version of the system because it is built into toolchain, while the version of glibc is the built into rootfs integrated in the rootfs of a linux distribution, which is the most basic referenced part and cannot be upgraded / replaced. It is an immovable item. You need to prepare another libc-dev (glibc-dev) that the platform depends on, which may need to be done in other gcc compilations of pass,phase.
In fact, GCC is also a kernel-like complex package, ng-crosstools useful class kernel menuconfig way to generate .config environment.
The following testing procedures are all tested under the hard disk version of tinycolinux, and the live version is not convenient. Please download tinycolinux live hd all-in-one package and continue:
Set up bootstrap toolchain
The following tcz are all 4.x by default, extracted from the dep of the 4.x compiletc.tcz meta package. The bottom part of the eglibc_base-dev below is the glibc development package. Glibc runtime is already in the / lib of tinycolinux, and the other ones at the bottom are optional development packages, because the comparative base is retained. Gcc is version 461. Please download these packages to / mnt/cobd0/tce/optional manually from a mirror 4.x/tcz directory. Then execute the following script directly in console-nt by paste.
Sudo unsquashfs-f-d / / mnt/cobd0/tce/optional/gmp.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libmpc.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/mpfr.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/gcc.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/binutils.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/m4.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/make.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/pkg-config.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/bison.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/flex.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/gawk.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/grep.tczsudo unsquashfs-f-d / / mnt / cobd0/tce/optional/sed.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/patch.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/diffutils.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/findutils.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/file.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/eglibc_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0 / tce/optional/gcc_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/linux-3.0.1_api_headers.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/util-linux_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/imlib2_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/e2fsprogs_base-dev.tczsudo unsquashfs-f-d / / Mnt/cobd0/tce/optional/fltk_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/freetype_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/jpeg_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libpng_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libsysfs_base-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/zlib_base-dev.tcz
After unzipping, test gcc-v dagger +-v. You may need sudo reboot to restart the tinycolinux system to find the installed but missing package.
Follow the difficulties of compiling gcc mentioned above, in fact, you can use this set of GCC461 as bootstrap to compile a new GCC such as gcc483 gcc491 etc... Let's test and compile the new lnmp with it:
Compile a new lnmp
Can not directly use the lnmp.org key package, because the system integration tool extension is different, generally, first compile mysql, then php, and then nginx, so that php-with-mysq= can refer to the mysql development package. The following packages are downloaded from 4.x as above, and the tcz for the entire article is from 4.x (note the cmake exception):
Mysql5.5
Sudo unsquashfs-f-d / / mnt/cobd0/tce/optional/cmakesudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libidn.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libiconv.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/ncurses-dev.tcz
Cmake is required for mysql after 5.5. Cmake.tcz is 3.x. 4.x cmake needs to install 4.x extra libstdc++, so I chose mixed 3.x tcz instead of 4.x cmake.
Both ncurses nginx and mysql are required (runtime part is required for nginx, dev pkg part is required for mysql)
Mkdir b; cd b; cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DWITH_MYISAM_STORAGE_ENGINE=1.
Php5.6
Sudo unsquashfs-f-d / mnt/cobd0/tce/optional/curl.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/curl-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libxml2.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libxml2-bin.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libxml2-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/liblzma. Tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libssh3.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/openssl-1.0.0.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/libpng.tcz
. / configure-- prefix=/usr/local/php-- enable-fpm-- enable-zip-- enable-mbstring-- with-mysql=mysqlnd-- with-pdo-mysql=mysqlnd-- with-zlib-- with-gd-- with-curl
(if we select the packages that are needed to install owncloud, mysql does not refer to the actual compiled 5.5package using the mysqlnd that comes with src.)
Nginx1.11
Sudo unsquashfs-f-d / / mnt/cobd0/tce/optional/pcre.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/pcre-dev.tczsudo unsquashfs-f-d / / mnt/cobd0/tce/optional/ncurses.tcz./configure-- prefix=/usr/local/nginx
During the above compilation process, if the unzipped reference package cannot be found, it is usually some package containing .so, which requires sudo reboot to restart the guest system once.
Configure the running section:
The above php and mysql obviously do not specify the directories of my.cnf and php.ini, but they are in / usr/local/mysql/ and / usr/local/php/lib/php.ini by default. You can build two by yourself. You need to configure the two files php.ini, so that the options in tz.php that smtp supports and controls more behavior of php, such as uploading max upload size, can be displayed.
There are some additional processing parts:
Create a new tmp in mysql to put mysql.sock. Its permissions should be the same as data, set to 0755 and owned by tc users under staff. In this way, mysql_install_db can correctly generate the initial database + pid file and mysqld_safe generate mysql.sock file.
You can add two startup methods under / opt/bootlocal.sh:
/ usr/local/nginx/sbin/nginx; / usr/local/php/sbin/php-fpm; / usr/local/mysql/bin/mysqld_safe &
Of course, you may need to compile additional mta and redis, I found that online chenall (grub4dos author) has a similar tinycolinux distribution, using 473. It can mount / home,/tce to the local share folder, although the permissions can not continue, but in a sense, this is "co-disk windows,linux", this should not be the official support function (vmlinux or initrd473), just do not know how to achieve.
Thank you for your reading, the above is the content of "what is the method of creating an application package for tinyco linux". After the study of this article, I believe you have a deeper understanding of what the method of creating an application package for tinyco linux is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.