ubuntu 16.04 搭建lamp的苦逼经历

大致流程:

apache安装:

edemon@linux:~$ sudo apt install apache2

php安装:

edemon@linux:~$ sudo apt install php7.0-cli
……
Creating config file /etc/php/7.0/cli/php.ini with new version

mysql安装:

edemon@linux:~$ sudo apt install mysql-server
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.12, use –force if you still need to run mysql_upgrade
Setting up mysql-server (5.7.12-0ubuntu1) …

其他模块:

edemon@linux:~$ sudo apt-get install libapache2-mod-php7.0

检测php:

edemon@linux:~$ cat /etc/apache2/mods-enabled/php7.0.load
# Conflicts: php5
LoadModule php7_module /usr/lib/apache2/modules/libphp7.0.so

测试并开启服务:

edemon@linux:~ sudoservicemysqlrestarted

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MySQL 8 Cookbook: Over 150 recipes for high-performance database querying and administration Design and administer enterprise-grade MySQL 8 solutions Key Features Store, retrieve, and manipulate your data using the latest MySQL 8 features Practical recipes on effective administration in MySQL, with a focus on security, performance tuning, troubleshooting, and more Contains tips, tricks, and best practices for designing, developing, and administering your MySQL 8 database solution without any hassle Book Description MySQL is one of the most popular and widely used relational databases in the World today. The recently released MySQL 8 version promises to be better and more efficient than ever before. This book contains everything you need to know to be the go-to person in your organization when it comes to MySQL. Starting with a quick installation and configuration of your MySQL instance, the book quickly jumps into the querying aspects of MySQL. It shows you the newest improvements in MySQL 8 and gives you hands-on experience in managing high-transaction and real-time datasets. If you've already worked with MySQL before and are looking to migrate your application to MySQL 8, this book will also show you how to do that. The book also contains recipes on efficient MySQL administration, with tips on effective user management, data recovery, security, database monitoring, performance tuning, troubleshooting, and more. With quick solutions to common and not-so-common problems you might encounter while working with MySQL 8, the book contains practical tips and tricks to give you the edge over others in designing, developing, and administering your database effectively. What you will learn Install and configure your MySQL 8 instance without any hassle Get to grips with new features of MySQL 8 like CTE, Window functions and many more Perform backup tasks, recover data and set up various replication topologies for your database Maximize performance by using new features o
从mysql官网上下载mysql-server_5.7.21-1ubuntu14.04_amd64.deb-bundle.tar,然后进行离线安装,解压该安装包,会出现11个依赖包,按照顺序依次使用sudo dpkg -i 进行安装,中间会报错,显示缺少相应的依赖,具体如下: *******@ubuntu:/opt/mysql$ sudo dpkg -i mysql-community-client_5.7.21-1ubuntu14.04_amd64.deb Selecting previously unselected package mysql-community-client. (Reading database ... 208518 files and directories currently installed.) Preparing to unpack mysql-community-client_5.7.21-1ubuntu14.04_amd64.deb ... Unpacking mysql-community-client (5.7.21-1ubuntu14.04) ... dpkg: dependency problems prevent configuration of mysql-community-client: mysql-community-client depends on libaio1 (>= 0.3.93); however: Package libaio1 is not installed. dpkg: error processing package mysql-community-client (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Errors were encountered while processing: mysql-community-client 和 ********@ubuntu:/opt/mysql$ sudo dpkg -i mysql-community-server_5.7.21-1ubuntu14.04_amd64.deb Selecting previously unselected package mysql-community-server. (Reading database ... 208598 files and directories currently installed.) Preparing to unpack mysql-community-server_5.7.21-1ubuntu14.04_amd64.deb ... Unpacking mysql-community-server (5.7.21-1ubuntu14.04) ... dpkg: dependency problems prevent configuration of mysql-community-server: mysql-community-server depends on libmecab2 (>= 0.996-1.1); however: Package libmecab2 is not installed. dpkg: error processing package mysql-community-server (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Errors were encountered while processing: mysql-community-server 附上依赖包安装顺序: 1.mysql-common_5.7.21-1ubuntu14.04_amd64.deb 2.libmysqlclient20_5.7.21-1ubuntu14.04_amd64.deb 3.libmysqlclient-dev_5.7.21-1ubuntu14.04_amd64.deb 4.libmysqld-dev_5.7.21-1ubuntu14.04_amd64.deb
Ubuntu 16.04是一种常用的Linux操作系统,而Hadoop是一个用于分布式存储和处理大规模数据的开源框架。在Ubuntu 16.04搭建伪分布式Hadoop环境可以用于学习和测试目的。 以下是搭建伪分布式Hadoop环境的步骤: 1. 安装Java:首先确保已经安装了Java Development Kit (JDK)。可以通过以下命令安装OpenJDK: ``` sudo apt-get update sudo apt-get install openjdk-8-jdk ``` 2. 下载Hadoop:从Hadoop官方网站下载最新版本的Hadoop压缩包,并解压到指定目录。可以使用以下命令进行解压: ``` tar -xzvf hadoop-x.x.x.tar.gz ``` 3. 配置环境变量:编辑`~/.bashrc`文件,并添加以下内容: ``` export HADOOP_HOME=/path/to/hadoop export PATH=$PATH:$HADOOP_HOME/bin ``` 4. 配置Hadoop:进入Hadoop的安装目录,编辑`etc/hadoop/core-site.xml`文件,添加以下内容: ``` <configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> </configuration> ``` 然后编辑`etc/hadoop/hdfs-site.xml`文件,添加以下内容: ``` <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration> ``` 5. 格式化HDFS:运行以下命令来格式化HDFS: ``` hdfs namenode -format ``` 6. 启动Hadoop:运行以下命令启动Hadoop: ``` start-dfs.sh start-yarn.sh ``` 7. 验证Hadoop:在浏览器中访问`http://localhost:50070`,可以看到Hadoop的Web界面。 以上是在Ubuntu 16.04搭建伪分布式Hadoop环境的基本步骤。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值