archlinux

ArchLinux 安装笔记

匿名 (未验证) 提交于 2019-12-02 21:53:52
### 前言 在开始之前,请在心中默念三遍: **Arch Linux 是世界上最好的发行版, 我一定能掌握她.** ### 环境 VM ware + UEFI + 500G 虚拟磁盘 + 2G 内存 + 桥接网络 ### 下载镜像 进入这里挑个最新的就好, https://mirrors.tuna.tsinghua.edu.cn/archlinux/iso/ 我下载的是 https://mirrors.tuna.tsinghua.edu.cn/archlinux/iso/2018.01.01/archlinux-2018.01.01-x86_64.iso ### 测试网络 `ping baidu.com` ### 对时 `timedatectl set-ntp true` ### 分区 常用分区工具有 `fdisk / gdisk / parted`. fdisk 不支持 gpt, parted 不太完善, UEFI 启动最好搭配 GPT 格式的磁盘, 所以这里我们采用 gdisk **分区规划** 分区 | 空间 ---- | --- EFI | 500 M Boot | 500 M / | 硬盘剩余空间 **使用 gdisk 分区** 执行 `fdisk -l` 或者 `lsblk` 查看硬盘设备名 执行 `gdisk /dev/sda` 开始分区, `dev/sda`

[ARCH] 1、virtualbox中安装archlinux+i3桌面,并做简单美化

匿名 (未验证) 提交于 2019-12-02 21:53:52
星期六, 28. 七月 2018 02:42上午 - beautifulzzzz 安装Arch主要看其wiki,比较详细~ 中文的我主要参考: 一步步教你如何安装 Arch Linux ,具体细的流程倒是忘了,大致操作如下: 我是在virtualbox中安装的,因此只要下载IOS,不用制作U盘了~ 1)从IOS启动; 2)磁盘分区,参考 【#1-磁盘分区】 ; 3)创建文件系统,参考 【#1-创建文件系统】 ; 4)安装,参考 【#1-安装】 ; 5)配置系统,参考 【#1-配置系统】 ; 6)设定时区,参考 【#1-设定时区】 ; 7)设置地区,参考 【#1-设置地区】 ; 8)安装 bootloader,设置主机名和 root 密码,参考 【#1】 ; 9)安装桌面,参考 【#1-安装桌面】 ; 对于新手,我比较推荐仔细看wiki,同时结合上面的文章尝试~如果你用ubuntu尝试安装过树莓派,会发现差不多~ 注: 新系统ping百度报错,发现需要配置网络:ping Temporary failure in name resolution,解决方法是 ArchLinux安装图文教程 第11节配置网络; 注: 用上面的方法有时候会出现源不行安装失败的情况,我从 ArchLinux安装图文教程 发现需要更换中国源,然后再安装,更新源的方法见: 【为archlinux选择国内镜像】

Why is the gcc math library so inefficient?

痴心易碎 提交于 2019-12-02 17:59:41
When I was porting some fortran code to c, it surprised me that the most of the execution time discrepancy between the fortran program compiled with ifort (intel fortran compiler) and the c program compiled with gcc, comes from the evaluations of trigonometric functions ( sin , cos ). It surprised me because I used to believe what this answer explains, that functions like sine and cosine are implemented in microcode inside microprocessors. In order to spot the problem more explicitly I made a small test program in fortran program ftest implicit none real(8) :: x integer :: i x = 0d0 do i = 1,

vagrant 'hostonlyif' create not working

假如想象 提交于 2019-12-02 17:34:53
I'm trying to do a vagrant up on a box, and I get the following error. INFO interface: error: There was an error executing the following command with VBoxManage: ["hostonlyif", "create"] When doing an INFO on the VAGRANT_LOG, I get ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_base.rb:278:in `block in execute' /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/util/retryable.rb:14:in `retryable' /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_base.rb:268:in `execute' /opt/vagrant/embedded/gems/gems/vagrant-1.0.6

Archlinux中更换grub主题

浪尽此生 提交于 2019-12-01 17:19:01
1. 下载grub主题包 b 2. 解压文件,复制到主题目录下。 /boot/grub/themes 3. 修改配置文件 sudo vim /etc/grub.d/00_header 添加如下内容 GRUB_THEME="/boot/grub/themes/主题包名/theme.txt" 4. 更新配置文件 sudo grub-mkconfig -o /boot/grub/grub.cfg 来源: https://www.cnblogs.com/mc-r/p/11695476.html

Linux's security measures against executing shellcode

点点圈 提交于 2019-12-01 11:07:10
I'm learning the basics of computer security and I'm trying to execute some shellcode I've written. I followed the steps given here http://dl.packetstormsecurity.net/papers/shellcode/own-shellcode.pdf http://webcache.googleusercontent.com/search?q=cache:O3uJcNhsksAJ:dl.packetstormsecurity.net/papers/shellcode/own-shellcode.pdf+own+shellcode&cd=1&hl=nl&ct=clnk&gl=nl $ cat pause.s xor %eax,%eax mov $29,%al int $0x80 $ as -o pause.o pause.s $ ld -o pause pause.o ld: warning: cannot find entry symbol _start; defaulting to <<some address here>> $ ./pause ^C $ objdump -d ./pause pause: file format

ImportError: /usr/lib/libboost_python.so.1.54.0: undefined symbol: PyClass_Type

半世苍凉 提交于 2019-11-30 20:54:09
I have code written in C++: #include <boost/python.hpp> char const* greet() { return "Yay!"; } BOOST_PYTHON_MODULE(libtest) { using namespace boost::python; def("greet", greet); } Now i want to import this dynamic library to python by: import libtest But I get: ImportError: /usr/lib/libboost_python.so.1.54.0: undefined symbol: PyClass_Type What should I do? My OS is Arch Linux. Ok, I have found solution for this problem. The simplest options is to compile by: g++ testing.cpp -I/usr/include/python3.3m -I/usr/include/boost -lboost_python3 -lpython3.3m -o testing.so -shared -fPIC Previously I

clang 4 build error on <functional> with c++1z

强颜欢笑 提交于 2019-11-30 19:35:18
I just updated my arch linux system to the latest which includes gcc 7.1.1. Trying to build this: #include <functional> int main(int argc, char** argv) { return 1; } using the command clang++ main.cpp -std=c++1z results in the error: In file included from main.cpp:1: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/functional:60: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/unordered_map:47: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1

archlinux 使用 postgresql

社会主义新天地 提交于 2019-11-30 17:02:48
一、准备操作 默认安装后已创建 postgres 系统用户 切换用户 $ sudo -iu postgres # Or su - postgres for root 数据目录初始化 [postgres]$ initdb --locale=zh_CN.UTF-8 -E UTF8 -D /var/lib/postgres/data 退出此用户,启动服务 postgresql.service 二、常见操作 再次进入 sudo -iu postgres, 添加新的数据库用户 $ createuser --interactive 创建数据库 $ createdb myDatabaseName    登录 psql shell psql -d myDatabaseName #查看所有数据库 \l #切换数据库 \c <database> #列出所有用户及权限 \du #列出当前数据库所有表 \dt 三、配置文件 设置远程访问 /var/lib/postgres/data/postgresql.conf listen_addresses = 'localhost,my_local_ip_address' 四、排错及其它 查看日志 journalctl -u postgresql.service 修改模板 UTF-8 First, we need to drop template1 .

Archlinux安装mariadb

孤街浪徒 提交于 2019-11-30 12:36:22
# pacman -S mariadb # mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql # /usr/bin/mysqld_safe --datadir='/var/lib/mysql' # systemctl start mysqld.service # mysql_secure_installation*** 下面是根据提示输入,默认就好,注意有一个地方是修改root密码,别直接回车。# systemctl enable mysqld 来源: https://www.cnblogs.com/mc-r/p/11588483.html